New Properties, Events, and Client-side API added in WebTextEditor

By erikaa | October 9, 2009

As published previously, we have released WebUI Studio 2009 R1 SP1 which includes many enhancements, especially to WebTextEditor and WebScheduler 2. Specifically in WebTextEditor, some new properties, client-side events, and client-side API are included.

New Properties

  • ToolBarSettings >> SerializationMode, determines the serialization mode used for toolbars definition. When set to Client, the page output will be much reduced. Read the complete explanation here
  • ToolBarSettings >> SynchronizeCommandLatency, determines the latency used to synchronize the toolbar commands with the format of selected content. When users navigate through contents that has different format, the toolbar commands will be synchronized to the selected content. This property determines the latency used before the synchronization action is invoked.
  • PreventScriptInjection, determines whether WebTextEditor should detect whether the content contains script injection. If this property is enabled, all script tags and its content will be removed when the content is saved.
  • ShowCallOutOnMediaInsert, determines whether callout should be automatically displayed when a media is inserted as editor content.
  • ShowMediaActionOnMediaSelect, determines whether media action should be displayed when a media is selected.

New client-side events

  • OnKeyDown, will be invoked when there is a key down input in editor.
    function WebTextEditor1_OnKeyDown(controlId, keyCode)
    {
         var rte = ISGetObject(controlId);
         //implement your codes here
    }
  • OnMediaSelected, will be invoked when a media is selected. Users can input media to editor content from Media Gallery. When the media is selected, this event will be invoked when specified.
    function WebTextEditor1_OnMediaSelected(contolId, element)
    {
         var rte = ISGetObject(controlId);
         //implement your codes here
    }
  • OnBeforeResize and OnAfterResize, will be invoked before and after editor is resized using the footer resize element.
    function WebTextEditor1_OnBeforeResize(controlId)
    {
         var rte = ISGetObject(controlId);
         //implement your codes here
    } 
    
    function WebTextEditor1_OnAfterResize(controlId)
    {
         var rte = ISGetObject(controlId);
         //implement your codes here
    }
  • Integrated file-uploader client side events, which are OnBeforeUpload, OnUploaderValidate, OnUploading, OnAfterUpload, OnCancelUpload, OnUploaderInitialize, OnUploaderError, OnUploaderFileAdded, and OnUploaderFileRemoved. When WebFileUploader is integrated to WebTextEditor and users perform specific action related to it, the above events will be invoked when specified.

New client-side APIs

  • SetValueToCurrentPosition, used to set value on the last active cursor position. When users navigate through the content and lost focus from editor, a specific value can be added to editor. When this API is used, the value will be added to the last active cursor position before users lost focus from editor.
    var rte = ISGetObject(“WebTextEditor1”);
    rte.SetValueToCurrentPosition(“new value”);
  • SetFocus, used to set focus to WebTextEditor. When watermark is enabled, this function will remove the watermark and set focus to editor content.
    var rte = ISGetObject(“WebTextEditor1”);
    rte.SetFocus();
  • ToggleToolBar, used to toggle or un-toggle a specific toolbar.
    var rte = ISGetObject(“WebTextEditor1”);
    var toolbar = rte.ClientToolBar[1];
    rte.ToggleToolBar(toolbar, false);
  • ResetEditorState, used to reset the editor state to default state. This API will set the content to empty, close the task pane, reset the state of commands in all toolbars, reset the undo and redo collections, and reset the integrated uploader status.
    var rte = ISGetObject(“WebTextEditor1”);
    rte.ResetEditorState();
  • HideCallOut, used to hide the callout. You can specify whether the hide action will be performed using animation.
    var rte = ISGetObject(“WebTextEditor1”);
    rte.HideCallOut(false); //hide callout without animation
  • RegisterIFrameBehavior and UnregisterIFrameBehavior, used to register and unregister the behavior attached to IFrame element of WebTextEditor. When WebTextEditor element is removed and placed in various elements in the page, the behavior attached to the IFrame element will be lost. These new APIs can be used to re-register or unregister the behavior when needed.

If you have installed WebUI Studio 2009 R1 SP1, you can read the complete version history of the enhancements and fixes in Intersoft WebUI Studio 2009 R1 SP1 Release Notes.pdf.

Tags: 2009 R1, Products, Client side API, client-side event, Property, WebTextEditor

Comment (0)

There is no comment available.
Name
Email (hidden)
Comment
Previous Next